<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/views/global/taglibs.jsp" %>
<!DOCTYPE html>
<html>
  <head>
    <base href="<%=basePath %>">
    <title>PRODUCT INVENTORY LIST</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<%@include file="/views/global/ShopInclude.jsp" %>
	<link href="static/css/page/ProductEdit.css" rel="stylesheet" type="text/css">
  </head>
  
  <body class="submitBg">
  <%@include file="/views/global/header.jsp" %>
  <c:set var="pageName" value="productList"></c:set>
  <%@include file="/views/global/SellerHeader.jsp" %>
  <div class="submitFormContainer center font fontColorGray">  <!-- 表单填写部分 -->
    <div class="submitFormTitle">PRODUCT INVENTORY LIST</div>
    <hr class="hrBorder" />
    <form id="itemForm" name="itemForm" method="post" target="_blank">
    </form>
    <div class="form-group row hrTableThin">
    	<div class="formLabel">
    		ALL PRODUCT <span class="glyphicon glyphicon-chevron-down"></span>
    	</div>
    </div>
    <div class="form-group row">
    	<c:if test="${empty entryList }">
   			<div class="center-block">
   				<div class="alert alert-danger" style="border: 0;color:#000;">NO ITEMS FOUND, <a href="seller/product/edit" style="text-decoration: initial;">UPLOAD</a> IT NOW!</div>
   			</div>
   		</c:if>
    	<ul class="item-list">
    		<c:forEach var="item" items="${entryList }">
	    		<li>
    				<a href="item/detail?id=${item.id }" target="_blank">
    					<img src="${item.mainUrl }" class="item-image" width="180" height="180"/>
    				</a>
	    			<div class="item-title">${item.title }<br/>${item.cnName }</div>
	    			<div class="item-price row">
	    				<div class="col-xs-8">UNIT-PRICE</div>
	    				<div class="col-xs-4 fontColorGreen">¥ ${item.price }</div>
	    			</div>
	    			<div class="item-price row">
	    				<div class="col-xs-8">STOCK NUMBER</div>
	    				<div class="col-xs-4">${item.stock }</div>
	    			</div>
	    			<div class="item-price row">
	    				<div class="col-xs-8">SOLD NUMBER</div>
	    				<div class="col-xs-4">${item.sold }</div>
	    			</div>
	    			<div class="item-price row">
	    				<div class="col-xs-8">
	    					<a href="seller/product/edit?id=${item.id }" target="_blank" style="color: #0d6ff4;">EDIT</a>
	    				</div>
	    				<div class="col-xs-4">
	    					<a href="javascript:void(0)" onclick="deleteNode(this, '${item.id}', '${item.title }')" style="color: #0d6ff4;">DELETE</a>
	    				</div>
	    			</div>
	    		</li>
    		</c:forEach>
    	</ul>
    </div>
    <div class="form-group row">
    	<pagination:pagenav pageInfo="${pageInfo }" url="${actionPath }" formName="itemForm"></pagination:pagenav>
    </div>
  </div>
	
	<%@include file="/views/global/AdminScripts.jsp" %>
	<%@include file="/views/global/footer.jsp" %>
	<script type="text/javascript" src="static/javascript/page/product/ProductList.js"></script>
  </body>
</html>
